#!/usr/bin/env python3
import json
import sys

# 'how' 1,1,1,1

for w in sys.stdin:
    if not w:
        continue

    key, values = w.split("\t")

    key = json.loads(key)
    values = json.loads(values)

    sum = 0
    for v in  values:
        sum += int(v)

    print("{}\t{}".format(json.dumps(key), json.dumps(sum)))


